<template>
    <div class="cq-brand w1160">
        <CqTitle :ImgUrl="url" title="橙品牌遇见无数可能" :ImgWidth="width" :ImgHeight="height"></CqTitle>
        <ul class="cq-brand-items flex color-white">
            <li v-for="item in BrandList" :key="item.id">
                <div class="bg-box" :style="{ background: `url(${$get(item.ImgUrl)}) center / cover no-repeat` }"></div>
                <div class="hover-box" :style="{ background: `url(${$get(item.ImgHoverUrl)}) center / cover no-repeat` }"></div>
                <div class="normall-box flex fd_c">
                    <img :src="$get(`${item.icon}`)" width=90px height=90px :alt="item.ImgUrl">
                    <div class="text text-center">
                        <p class="des1 fz28">橙营销</p>
                        <p class="des2 fz16">营销助力品牌升级</p>
                    </div>
                    <BtnMore class="btn-more"></BtnMore>
                </div>
            </li>
        </ul>
    </div>
</template>

<script>
import BtnMore from './btn-more.vue'
import CqTitle from './cq-title.vue'
export default {
  name: 'Cq-items',
  components: {
    BtnMore,
    CqTitle
  },
  data () {
    return {
      url: 'logo-title',
      width: 391,
      height: 86,
      BrandList: [
        { id: 1, title: 'sell', ImgUrl: 'type1-sell', ImgHoverUrl: 'type1-sell-hover', icon: 'type1-sell-icon' },
        { id: 2, title: 'score', ImgUrl: 'type2-score', ImgHoverUrl: 'type2-score-hover', icon: 'type2-score-icon' },
        { id: 3, title: 'finance', ImgUrl: 'type3-finance', ImgHoverUrl: 'type3-finance-hover', icon: 'type3-finance-icon' },
        { id: 4, title: 'benefit', ImgUrl: 'type4-benefit', ImgHoverUrl: 'type4-benefit-hover', icon: 'type4-benefit-icon' }
      ]
    }
  }
}
</script>

<style lang="scss" scoped>
.cq-brand {
    padding-top: 240px;
    padding-bottom: 148px;
}

.cq-brand-items {
    justify-content: space-between;
    padding-top: 66px;
    .des1 {
        padding-top: 25px;
    }
    .des2 {
        color: #dadada;
        padding-bottom: 20px;
    }
    li {
        position: relative;
        width: 280px;
        height: 400px;
        .bg-box, .hover-box, .normall-box {
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
        }
        .bg-box {
            opacity: 1;
        }
        &:hover .bg-box {
            opacity: 0;
        }
        .hover-box {
            opacity: 0;
            transition: transform linear .3s;
        }
        &:hover .hover-box {
            opacity: 1;
            z-index: 1;
            transform: scale(1.2, 1.2);
        }
        .normall-box {
            justify-content: center;
            align-items: center;
            z-index: 1;
            .btn-more {
                opacity: 0;
            }
            &:hover .btn-more {
                opacity: 1;
            }
        }
    }
}
</style>
